<include file="Public:header"/>
<body data-tuktuk="boxes">
<include file="Public:left"/>
<style type="text/css">
.preview-pic{
    width: 143px;
    height: 228px;
}
.preview{
    width: 160px;
    float: left;
    padding: 2px;
    border: 1px solid #ccc;
    margin-right: 10px;
    margin-bottom: 12px;
}  
.use-theme{
    color: green;
}  
</style>
<include file="Public:aside"/>
    <section>
        <include file="Public:nav" />
        <hr />
        <article class="padding scroll">
            <div class="margin-bottom">
                <h4 class="text book inline">启动画面</h4>
                <a func="addpic()" data-fancybox-type="iframe" class="fancybox button on-right theme small icon plus" href="{:U('Admin/FileManager/index')}">新增画面</a>
            </div>  
            <hr />
            <div >
                <volist name="volist" id="vo">
                    <div class="preview " >
                        <img class="preview-pic" src="{$vo.picurl}">
                        <div >
                            <center><a href="{:U("Admin/Startpic/delete?id=$vo[id]")}" class="button tiny theme delete">删除</a></center>
                        </div>
                    </div>

                </volist>
            </div>
        </article>

        <footer class="bck dark text center">
            Powered by <a href="http://www.weiduniang.com" class="color theme text bold">Weiduniang</a>
        </footer>
    </section>
    
</body>
<load href="__PUBLIC__/js/app.js" />
<load href="__PUBLIC__/fancyBox/jquery.fancybox.css" />
<load href="__PUBLIC__/fancyBox/jquery.fancybox.min.js" />

<script type="text/javascript">
function backAddpic (pic) {
    if (pic) {
        var url = "{:U('Admin/Startpic/insert')}";
        $.post(url,{picurl:pic},function(req){
            window.location.reload();
        })
    }
}
$(function(){

    $('a.delete').on('click',function(e){
        e.preventDefault();
        var url  = $(this).attr('href');
        $.get(url,{},function(){
            window.location.reload();
        })
    })
    
    $(".fancybox").fancybox({
        maxWidth    : 800,
        maxHeight   : 900,
        fitToView   : false,
        width       : '70%',
        height      : '70%',
        autoSize    : false,
        closeClick  : false,
        openEffect  : 'none',
        closeEffect : 'none',
    });

})  
 
</script>

</html>
